package cn.lingyangwl.agile.infra.module.dict;

import cn.lingyangwl.agile.model.module.dict.CusFieldBind;
import cn.lingyangwl.framework.data.mate.fieldbind.inter.IFieldBindAnnotationDataGetter;
import cn.lingyangwl.framework.data.mate.fieldbind.model.AnnotationMetadata;
import org.springframework.stereotype.Component;

/**
 * @author shenguangyang
 */
@Component
public class CusFieldBIndAnnotationDataGetter implements IFieldBindAnnotationDataGetter<CusFieldBind> {

    @Override
    public AnnotationMetadata initFieldBindAnnotation(CusFieldBind fieldAnnotation) {
        return AnnotationMetadata.builder().type(fieldAnnotation.type())
                .delimiter(fieldAnnotation.delimiter())
                .targetDelimiter(fieldAnnotation.targetDelimiter())
                .target(fieldAnnotation.target()).build();
    }
}
